package com.shensi.api.admin.client.customer;

import com.shensi.api.admin.client.fallback.customer.CustomerManageClientFallBack;
import com.shensi.api.admin.domian.customer.dto.CustomerManageDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.constant.HttpStatus;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.domain.model.LoginUser;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.PageDomain;
import com.shensi.common.core.page.TableDataInfo;
import com.shensi.common.core.page.TableSupport;
import com.shensi.common.core.utils.SecurityUtils;
import com.shensi.common.core.utils.StringUtils;
import com.shensi.common.core.utils.poi.ExcelUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Random;

/**
 * @author: budian
 * @since: 2023/11/30
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CustomerManageClientFallBack.class)
@Component
public interface CustomerManageClient {
    @GetMapping("/customer/manage/list")
    public TableDataInfo list(@SpringQueryMap CustomerManageDto customerManage);

    /**
     * 导出客户管理列表
     */
    @GetMapping("/customer/manage/export")
    public AjaxResult export(@SpringQueryMap CustomerManageDto customerManage);

    /**
     * 获取客户管理详细信息
     */
    @GetMapping(value = "/customer/manage/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    /**
     * 新增客户管理
     */
    @PostMapping("/customer/manage")
    public AjaxResult add(@RequestBody CustomerManageDto customerManage);

    /**
     * 修改客户管理
     */
    @PutMapping("/customer/manage")
    public AjaxResult edit(@RequestBody CustomerManageDto customerManage);

    /**
     * 删除客户管理
     */
    @DeleteMapping("/customer/manage/{ids}")
    public AjaxResult remove(@PathVariable("ids") Long[] ids);

}
